#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

int main() {
    std::string a;
    std::getline(std::cin, a);
    int c = 0;
    int d = 0;
    int e = 0;
    int f = 0;
    int x = 0;
    std::string n = "";
    std::vector<std::string> b;
    std::string word;
    std::stringstream ss(a);
    while (ss >> word) {
        b.push_back(word);
    }
    std::cout << "Кол-во слов: " << b.size() << std::endl;
    for (const auto& word : b) {
        if (word[0] == 'А' || word[0] == 'Б' || word[0] == 'В' || word[0] == 'Г' || word[0] == 'Д' || word[0] == 'Е' || word[0] == 'Ж' || word[0] == 'З' || word[0] == 'И' || word[0] == 'К' || word[0] == 'Л' || word[0] == 'М' || word[0] == 'Н' || word[0] == 'О' || word[0] == 'П' || word[0] == 'Р' || word[0] == 'С' || word[0] == 'Т' || word[0] == 'У' || word[0] == 'Ф' || word[0] == 'Ч' || word[0] == 'Х' || word[0] == 'Ш' || word[0] == 'Щ' || word[0] == 'Э' || word[0] == 'Ю' || word[0] == 'Я') {
            d++;
        }
        bool containsLatin = false;
        for (char c : word) {
            if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || c == 'e' || c == 'f' || c == 'g' || c == 'h' || c == 'i' || c == 'j' || c == 'k' || c == 'l' || c == 'm' || c == 'n' || c == 'o' || c == 'p' || c == 'r' || c == 's' || c == 't' || c == 'v' || c == 'x' || c == 'y' || c == 'z' || c == 'w' || c == 'u') {
                e++;
                containsLatin = true;
                break;
            }
        }
        if (!containsLatin) {
            f++;
        }
        if (word.find('-') != std::string::npos) {
            x++;
        }
        if (word.length() > c) {
            n = word;
            c = word.length();
        }
    }
    std::cout << "Кол-во слов с заглавной кириллической буквы: " << d << std::endl;
    std::cout << "Кол-во слов содержащих латинский символ: " << e << std::endl;
    std::cout << "Кол-во слов не превышающих 3 символа: " << f << std::endl;
    std::cout << "Кол-во слов в составе которых имеется дефис: " << x << std::endl;
    std::cout << std::endl;
    std::cout << "Самое длинное слово: " << n << std::endl;
    std::cout << n.length() << std::endl;
    return 0;
}